#ifndef OHOS_SHARING_WFD_SOURCE_MANAGER_H
#define OHOS_SHARING_WFD_SOURCE_MANAGER_H

#include "wfd_source.h"

namespace OHOS {
namespace Sharing {
  class WfdSourceManager {
    public:
      // 删除拷贝构造函数和赋值操作符，防止复制单例实例
      WfdSourceManager(const WfdSourceManager&) = delete;
      WfdSourceManager& operator=(const WfdSourceManager&) = delete;

      // 提供全局访问点
      static WfdSourceManager& getInstance() {
        static WfdSourceManager instance;
        return instance;
      }

      // 获取WfdSource的shared_ptr
      std::shared_ptr<WfdSource>& getWfdSource() {
        return nativeWfdSource_;
      }

    private:
      // 私有构造函数
      WfdSourceManager() {}

      // 持有WfdSource的shared_ptr
      std::shared_ptr<WfdSource> nativeWfdSource_;
  };   
} // namespace Sharing
} // namespace OHOS
#endif